//
//  MineAccountItem.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/7/5.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "MineAccountItem.h"

@implementation MineAccountItem

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    self.btn1 = [[buttonItem alloc] init];
    _btn1.topLB.text = @"10";
    _btn1.bottomLB.text = @"我的积分";
    [self addSubview:_btn1];
    [_btn1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_offset(CGSizeMake(kScreenWidth/3, rateHeight(120)));
        make.left.equalTo(self);
        make.centerY.equalTo(self);
    }];
    
    self.btn2 = [[buttonItem alloc] init];
    _btn2.topLB.text = @"1000";
    _btn2.bottomLB.text = @"消费总额";
    [self addSubview:_btn2];
    [_btn2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_offset(CGSizeMake(kScreenWidth/3, rateHeight(120)));
        make.center.equalTo(self);
    }];
    
    self.btn3 = [[buttonItem alloc] init];
    _btn3.topLB.text = @"100";
    _btn3.bottomLB.text = @"账户余额";
    [self addSubview:_btn3];
    [_btn3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_offset(CGSizeMake(kScreenWidth/3, rateHeight(120)));
        make.right.equalTo(self);
        make.centerY.equalTo(self);
    }];
    
    UIView *line1 = [[UIView alloc] init];
    line1.backgroundColor = UIColorWithRGB(242, 241, 242);
    [self addSubview:line1];
    [line1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(kScreenWidth/3);
        make.centerY.equalTo(self);
        make.size.mas_offset(CGSizeMake(rateWidth(2), rateHeight(80)));
    }];
    
    UIView *line2 = [[UIView alloc] init];
    line2.backgroundColor = UIColorWithRGB(242, 241, 242);
    [self addSubview:line2];
    [line2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(-kScreenWidth/3);
        make.centerY.equalTo(self);
        make.size.mas_offset(CGSizeMake(rateWidth(2), rateHeight(80)));
    }];
}

@end
